package com.teamcenter.rac.massupdate.ui.grid.layers;

import com.teamcenter.rac.massupdate.ui.grid.IGridRow;
import net.sourceforge.nattable.grid.data.DefaultRowHeaderDataProvider;
import net.sourceforge.nattable.grid.layer.DefaultRowHeaderDataLayer;
import net.sourceforge.nattable.grid.layer.RowHeaderLayer;
import net.sourceforge.nattable.layer.AbstractLayerTransform;

public class MassUpdateRowHeaderLayerStack<T extends IGridRow> extends AbstractLayerTransform {
	private final DefaultRowHeaderDataProvider m_rowHeaderDataProvider;
	private final DefaultRowHeaderDataLayer m_rowHeaderDataLayer;
	private final RowHeaderLayer m_rowHeaderLayer;

	public MassUpdateRowHeaderLayerStack(MassUpdateBodyLayerStack<T> paramMassUpdateBodyLayerStack) {
		this.m_rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
				paramMassUpdateBodyLayerStack.getDataProvider());
		this.m_rowHeaderDataLayer = new DefaultRowHeaderDataLayer(this.m_rowHeaderDataProvider);
		this.m_rowHeaderLayer = new RowHeaderLayer(this.m_rowHeaderDataLayer, paramMassUpdateBodyLayerStack,
				paramMassUpdateBodyLayerStack.getSelectionLayer());
		setUnderlyingLayer(this.m_rowHeaderLayer);
	}

	public DefaultRowHeaderDataProvider getDataProvider() {
		return this.m_rowHeaderDataProvider;
	}

	public DefaultRowHeaderDataLayer getDataLayer() {
		return this.m_rowHeaderDataLayer;
	}

	public RowHeaderLayer getRowHeaderLayer() {
		return this.m_rowHeaderLayer;
	}
}
